package com.kede.app.domain;

import lombok.Data;
import io.swagger.annotations.ApiModelProperty;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import javax.persistence.*;
import javax.validation.constraints.*;
import java.io.Serializable;

/**
* @description /
* @author Pr.li
* @date 2023-05-13
**/
@Entity
@Data
@Table(name="sy_leescore_address")
public class LeescoreAddress implements Serializable {
    /**
    * 编号
    */
    @ApiModelProperty(value = "编号")
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "`id`")
    private Integer id;
    /**
    * 用户ID
    */
    @ApiModelProperty(value = "用户ID")
    @Column(name = "`uid`")
    private Integer uid;
    /**
    * 邮编
    */
    @ApiModelProperty(value = "邮编")
    @Column(name = "`zip`")
    private String zip;
    /**
    * 
    */
    @ApiModelProperty(value = "mobile")
    @Column(name = "`mobile`")
    private String mobile;
    /**
    * 
    */
    @ApiModelProperty(value = "country")
    @Column(name = "`country`")
    private String country;
    /**
    * 省 / 区
    */
    @ApiModelProperty(value = "省 / 区")
    @Column(name = "`region`")
    private String region;
    /**
    * 城市
    */
    @ApiModelProperty(value = "城市")
    @Column(name = "`city`")
    private String city;
    /**
    * 县 / 区
    */
    @ApiModelProperty(value = "县 / 区")
    @Column(name = "`xian`")
    private String xian;
    /**
    * 
    */
    @ApiModelProperty(value = "address")
    @Column(name = "`address`")
    private String address;
    /**
    * 默认收货地址
    */
    @ApiModelProperty(value = "默认收货地址")
    @Column(name = "`status`")
    private Integer status;
    /**
    * 创建时间
    */
    @ApiModelProperty(value = "创建时间")
    @Column(name = "`createtime`")
    private Integer createtime;
    /**
    * 姓氏
    */
    @ApiModelProperty(value = "姓氏")
    @Column(name = "`firstname`")
    private String firstname;
    /**
    * 名字
    */
    @ApiModelProperty(value = "名字")
    @Column(name = "`lastname`")
    private String lastname;
    /**
    * 逻辑删除
    */
    @ApiModelProperty(value = "逻辑删除")
    @Column(name = "`isdel`")
    private Integer isdel;

    public void copy(LeescoreAddress source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}
